<?php
use Workerman\Worker;
use Workerman\Lib\Timer;

$task = new Worker();
$task->onWorkerStart = function($task)
{
    $timer_id = Timer::add(1,function(){
            //echo "Timer 1\n";
        }
    );

    $timer_id = Timer::add(6,function(){
            //echo "Timer 2\n";
        }
    );
};

// run all workers
if(!defined('GLOBAL_START'))
{
    Worker::runAll();
}